@using TaskManager.Web.Extensions
@model TaskManager.Web.ViewModels.Task.TaskEditModel   
@{
    ViewBag.Title = "Edit Task";
}
@using (Html.BeginForm(new { tab = ViewBag.Tab, id = Model.Id }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        @Html.HiddenFor(model => model.Id)
        @Html.NameAndTextBoxFor("Summary", model => model.Summary, new { @class = "xlarge" })
        @Html.NameAndTextAreaFor("Description", model => model.Description, new { rows = 3, @class = "xlarge" })
        @Html.NameAndDropDownListFor("Assignee", model => model.Assignee, ViewBag.Users as SelectList, null, new { @class = "large" })
        @Html.NameAndDropDownListFor("Owner", model => model.Owner, ViewBag.Users as SelectList, null, new { @class = "large" })
        @Html.NameAndDropDownListFor("Priority", model => model.Priority, new SelectList(new[] { 0, 1, 2, 3, 4 }), "None", new { @class = "large" })
        <p>
            <div class="row">
                <div class="span1" style="width: auto">
                    <input type="submit" class="btn primary form-action-btn" value="Save" id="Save" />
                </div>
                <div class="span1" style="width: auto">
                    @Html.ActionLink("Cancel", "Index", null, new { @class = "btn secondary" })
                </div>
            </div>            
        </p>
    </fieldset>
}